00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef PNGCONF_H
00018 #define PNGCONF_H
00019
00020 #ifdef PNG_USER_CONFIG
00021 #include "pngusr.h"
00022 #endif
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef PNG_ZBUF_SIZE
00038 # define PNG_ZBUF_SIZE 8192
00039 #endif
00040
00041
00042
00043 #ifndef PNG_NO_READ_SUPPORTED
00044 # define PNG_READ_SUPPORTED
00045 #endif
00046
00047
00048
00049 #ifndef PNG_NO_WRITE_SUPPORTED
00050 # define PNG_WRITE_SUPPORTED
00051 #endif
00052
00053
00054
00055 #if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES)
00056 # ifndef PNG_MNG_FEATURES_SUPPORTED
00057 # define PNG_MNG_FEATURES_SUPPORTED
00058 # endif
00059 #endif
00060
00061 #ifndef PNG_NO_FLOATING_POINT_SUPPORTED
00062 # ifndef PNG_FLOATING_POINT_SUPPORTED
00063 # define PNG_FLOATING_POINT_SUPPORTED
00064 # endif
00065 #endif
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075 #if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)
00076 # define PNG_MAX_MALLOC_64K
00077 #endif
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112 #if defined(__CYGWIN__)
00113 # if defined(ALL_STATIC)
00114 # if defined(PNG_BUILD_DLL)
00115 # undef PNG_BUILD_DLL
00116 # endif
00117 # if defined(PNG_USE_DLL)
00118 # undef PNG_USE_DLL
00119 # endif
00120 # if defined(PNG_DLL)
00121 # undef PNG_DLL
00122 # endif
00123 # if !defined(PNG_STATIC)
00124 # define PNG_STATIC
00125 # endif
00126 # else
00127 # if defined (PNG_BUILD_DLL)
00128 # if defined(PNG_STATIC)
00129 # undef PNG_STATIC
00130 # endif
00131 # if defined(PNG_USE_DLL)
00132 # undef PNG_USE_DLL
00133 # endif
00134 # if !defined(PNG_DLL)
00135 # define PNG_DLL
00136 # endif
00137 # else
00138 # if defined(PNG_STATIC)
00139 # if defined(PNG_USE_DLL)
00140 # undef PNG_USE_DLL
00141 # endif
00142 # if defined(PNG_DLL)
00143 # undef PNG_DLL
00144 # endif
00145 # else
00146 # if !defined(PNG_USE_DLL)
00147 # define PNG_USE_DLL
00148 # endif
00149 # if !defined(PNG_DLL)
00150 # define PNG_DLL
00151 # endif
00152 # endif
00153 # endif
00154 # endif
00155 #endif
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170 #if defined(_WIN32_WCE)
00171 # include <windows.h>
00172
00173 # define PNG_NO_CONSOLE_IO
00174 # ifdef PNG_DEBUG
00175 # undef PNG_DEBUG
00176 # endif
00177 #endif
00178
00179 #ifdef PNG_BUILD_DLL
00180 # ifndef PNG_CONSOLE_IO_SUPPORTED
00181 # ifndef PNG_NO_CONSOLE_IO
00182 # define PNG_NO_CONSOLE_IO
00183 # endif
00184 # endif
00185 #endif
00186
00187 # ifdef PNG_NO_STDIO
00188 # ifndef PNG_NO_CONSOLE_IO
00189 # define PNG_NO_CONSOLE_IO
00190 # endif
00191 # ifdef PNG_DEBUG
00192 # if (PNG_DEBUG > 0)
00193 # include <stdio.h>
00194 # endif
00195 # endif
00196 # else
00197 # if !defined(_WIN32_WCE)
00198
00199 # include <stdio.h>
00200 # endif
00201 # endif
00202
00203
00204
00205
00206
00207
00208
00209
00210 #ifndef PNGARG
00211
00212 #ifdef OF
00213 # define PNGARG(arglist) OF(arglist)
00214 #else
00215
00216 #ifdef _NO_PROTO
00217 # define PNGARG(arglist) ()
00218 # ifndef PNG_TYPECAST_NULL
00219 # define PNG_TYPECAST_NULL
00220 # endif
00221 #else
00222 # define PNGARG(arglist) arglist
00223 #endif
00224
00225 #endif
00226
00227 #endif
00228
00229
00230
00231
00232
00233 #ifndef MACOS
00234 # if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
00235 defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
00236 # define MACOS
00237 # endif
00238 #endif
00239
00240
00241 #if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)
00242 # include <sys/types.h>
00243 #endif
00244
00245 #if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED)
00246 # define PNG_SETJMP_SUPPORTED
00247 #endif
00248
00249 #ifdef PNG_SETJMP_SUPPORTED
00250
00251
00252
00253
00254 # ifdef __linux__
00255 # ifdef _BSD_SOURCE
00256 # define PNG_SAVE_BSD_SOURCE
00257 # undef _BSD_SOURCE
00258 # endif
00259 # ifdef _SETJMP_H
00260
00261
00262
00263 __png.h__ already includes setjmp.h;
00264 __dont__ include it again.;
00265 # endif
00266 # endif
00267
00268
00269 # include <setjmp.h>
00270
00271 # ifdef __linux__
00272 # ifdef PNG_SAVE_BSD_SOURCE
00273 # define _BSD_SOURCE
00274 # undef PNG_SAVE_BSD_SOURCE
00275 # endif
00276 # endif
00277 #endif
00278
00279 #ifdef BSD
00280 # include <strings.h>
00281 #else
00282 # include <string.h>
00283 #endif
00284
00285
00286 #ifdef PNG_INTERNAL
00287
00288 #include <stdlib.h>
00289
00290
00291
00292
00293
00294
00295
00296
00297 #define PNG_EXTERN
00298
00299
00300
00301
00302
00303 #if defined(PNG_FLOATING_POINT_SUPPORTED)
00304 # if defined(MACOS)
00305
00306
00307
00308
00309 # if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
00310 # include <fp.h>
00311 # endif
00312 # else
00313 # include <math.h>
00314 # endif
00315 # if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
00316
00317
00318
00319 # include <m68881.h>
00320 # endif
00321 #endif
00322
00323
00324 #if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
00325 # define PNG_ALWAYS_EXTERN
00326 #endif
00327
00328
00329 #if defined(__TURBOC__) && defined(__MSDOS__)
00330 # include <mem.h>
00331 # include <alloc.h>
00332 #endif
00333
00334
00335 #if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \
00336 defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))
00337 # include <malloc.h>
00338 #endif
00339
00340
00341
00342
00343
00344 #ifndef PNG_DITHER_RED_BITS
00345 # define PNG_DITHER_RED_BITS 5
00346 #endif
00347 #ifndef PNG_DITHER_GREEN_BITS
00348 # define PNG_DITHER_GREEN_BITS 5
00349 #endif
00350 #ifndef PNG_DITHER_BLUE_BITS
00351 # define PNG_DITHER_BLUE_BITS 5
00352 #endif
00353
00354
00355
00356
00357
00358
00359
00360
00361 #ifndef PNG_MAX_GAMMA_8
00362 # define PNG_MAX_GAMMA_8 11
00363 #endif
00364
00365
00366
00367
00368 #ifndef PNG_GAMMA_THRESHOLD
00369 # define PNG_GAMMA_THRESHOLD 0.05
00370 #endif
00371
00372 #endif
00373
00374
00375
00376
00377
00378
00379 #ifndef PNG_NO_CONST
00380 # define PNG_CONST const
00381 #else
00382 # define PNG_CONST
00383 #endif
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418 #ifndef PNG_iTXt_SUPPORTED
00419 # if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
00420 # define PNG_NO_READ_iTXt
00421 # endif
00422 # if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
00423 # define PNG_NO_WRITE_iTXt
00424 # endif
00425 #endif
00426
00427
00428
00429
00430
00431
00432
00433 #ifdef PNG_LEGACY_SUPPORTED
00434 # define PNG_NO_FREE_ME
00435 # define PNG_NO_READ_UNKNOWN_CHUNKS
00436 # define PNG_NO_WRITE_UNKNOWN_CHUNKS
00437 # define PNG_NO_READ_USER_CHUNKS
00438 # define PNG_NO_READ_iCCP
00439 # define PNG_NO_WRITE_iCCP
00440 # define PNG_NO_READ_iTXt
00441 # define PNG_NO_WRITE_iTXt
00442 # define PNG_NO_READ_sCAL
00443 # define PNG_NO_WRITE_sCAL
00444 # define PNG_NO_READ_sPLT
00445 # define PNG_NO_WRITE_sPLT
00446 # define PNG_NO_INFO_IMAGE
00447 # define PNG_NO_READ_RGB_TO_GRAY
00448 # define PNG_NO_READ_USER_TRANSFORM
00449 # define PNG_NO_WRITE_USER_TRANSFORM
00450 # define PNG_NO_USER_MEM
00451 # define PNG_NO_READ_EMPTY_PLTE
00452 # define PNG_NO_MNG_FEATURES
00453 # define PNG_NO_FIXED_POINT_SUPPORTED
00454 #endif
00455
00456
00457 #if !defined(PNG_FLOATING_POINT_SUPPORTED) || \
00458 !defined(PNG_NO_FIXED_POINT_SUPPORTED)
00459 # define PNG_FIXED_POINT_SUPPORTED
00460 #endif
00461
00462 #ifndef PNG_NO_FREE_ME
00463 # define PNG_FREE_ME_SUPPORTED
00464 #endif
00465
00466 #if defined(PNG_READ_SUPPORTED)
00467
00468 #if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \
00469 !defined(PNG_NO_READ_TRANSFORMS)
00470 # define PNG_READ_TRANSFORMS_SUPPORTED
00471 #endif
00472
00473 #ifdef PNG_READ_TRANSFORMS_SUPPORTED
00474 # ifndef PNG_NO_READ_EXPAND
00475 # define PNG_READ_EXPAND_SUPPORTED
00476 # endif
00477 # ifndef PNG_NO_READ_SHIFT
00478 # define PNG_READ_SHIFT_SUPPORTED
00479 # endif
00480 # ifndef PNG_NO_READ_PACK
00481 # define PNG_READ_PACK_SUPPORTED
00482 # endif
00483 # ifndef PNG_NO_READ_BGR
00484 # define PNG_READ_BGR_SUPPORTED
00485 # endif
00486 # ifndef PNG_NO_READ_SWAP
00487 # define PNG_READ_SWAP_SUPPORTED
00488 # endif
00489 # ifndef PNG_NO_READ_PACKSWAP
00490 # define PNG_READ_PACKSWAP_SUPPORTED
00491 # endif
00492 # ifndef PNG_NO_READ_INVERT
00493 # define PNG_READ_INVERT_SUPPORTED
00494 # endif
00495 # ifndef PNG_NO_READ_DITHER
00496 # define PNG_READ_DITHER_SUPPORTED
00497 # endif
00498 # ifndef PNG_NO_READ_BACKGROUND
00499 # define PNG_READ_BACKGROUND_SUPPORTED
00500 # endif
00501 # ifndef PNG_NO_READ_16_TO_8
00502 # define PNG_READ_16_TO_8_SUPPORTED
00503 # endif
00504 # ifndef PNG_NO_READ_FILLER
00505 # define PNG_READ_FILLER_SUPPORTED
00506 # endif
00507 # ifndef PNG_NO_READ_GAMMA
00508 # define PNG_READ_GAMMA_SUPPORTED
00509 # endif
00510 # ifndef PNG_NO_READ_GRAY_TO_RGB
00511 # define PNG_READ_GRAY_TO_RGB_SUPPORTED
00512 # endif
00513 # ifndef PNG_NO_READ_SWAP_ALPHA
00514 # define PNG_READ_SWAP_ALPHA_SUPPORTED
00515 # endif
00516 # ifndef PNG_NO_READ_INVERT_ALPHA
00517 # define PNG_READ_INVERT_ALPHA_SUPPORTED
00518 # endif
00519 # ifndef PNG_NO_READ_STRIP_ALPHA
00520 # define PNG_READ_STRIP_ALPHA_SUPPORTED
00521 # endif
00522 # ifndef PNG_NO_READ_USER_TRANSFORM
00523 # define PNG_READ_USER_TRANSFORM_SUPPORTED
00524 # endif
00525 # ifndef PNG_NO_READ_RGB_TO_GRAY
00526 # define PNG_READ_RGB_TO_GRAY_SUPPORTED
00527 # endif
00528 #endif
00529
00530 #if !defined(PNG_NO_PROGRESSIVE_READ) && \
00531 !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED)
00532 # define PNG_PROGRESSIVE_READ_SUPPORTED
00533 #endif
00534
00535
00536 #define PNG_READ_INTERLACING_SUPPORTED
00537
00538 #ifndef PNG_NO_READ_COMPOSITE_NODIV
00539 # ifndef PNG_NO_READ_COMPOSITED_NODIV
00540 # define PNG_READ_COMPOSITE_NODIV_SUPPORTED
00541 # endif
00542 #endif
00543
00544
00545
00546 #ifndef PNG_NO_READ_EMPTY_PLTE
00547 # define PNG_READ_EMPTY_PLTE_SUPPORTED
00548 #endif
00549
00550 #endif
00551
00552 #if defined(PNG_WRITE_SUPPORTED)
00553
00554 # if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
00555 !defined(PNG_NO_WRITE_TRANSFORMS)
00556 # define PNG_WRITE_TRANSFORMS_SUPPORTED
00557 #endif
00558
00559 #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
00560 # ifndef PNG_NO_WRITE_SHIFT
00561 # define PNG_WRITE_SHIFT_SUPPORTED
00562 # endif
00563 # ifndef PNG_NO_WRITE_PACK
00564 # define PNG_WRITE_PACK_SUPPORTED
00565 # endif
00566 # ifndef PNG_NO_WRITE_BGR
00567 # define PNG_WRITE_BGR_SUPPORTED
00568 # endif
00569 # ifndef PNG_NO_WRITE_SWAP
00570 # define PNG_WRITE_SWAP_SUPPORTED
00571 # endif
00572 # ifndef PNG_NO_WRITE_PACKSWAP
00573 # define PNG_WRITE_PACKSWAP_SUPPORTED
00574 # endif
00575 # ifndef PNG_NO_WRITE_INVERT
00576 # define PNG_WRITE_INVERT_SUPPORTED
00577 # endif
00578 # ifndef PNG_NO_WRITE_FILLER
00579 # define PNG_WRITE_FILLER_SUPPORTED
00580 # endif
00581 # ifndef PNG_NO_WRITE_SWAP_ALPHA
00582 # define PNG_WRITE_SWAP_ALPHA_SUPPORTED
00583 # endif
00584 # ifndef PNG_NO_WRITE_INVERT_ALPHA
00585 # define PNG_WRITE_INVERT_ALPHA_SUPPORTED
00586 # endif
00587 # ifndef PNG_NO_WRITE_USER_TRANSFORM
00588 # define PNG_WRITE_USER_TRANSFORM_SUPPORTED
00589 # endif
00590 #endif
00591
00592 #define PNG_WRITE_INTERLACING_SUPPORTED
00593
00594
00595
00596 #if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
00597 defined(PNG_FLOATING_POINT_SUPPORTED)
00598 # define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
00599 #endif
00600
00601 #ifndef PNG_NO_WRITE_FLUSH
00602 # define PNG_WRITE_FLUSH_SUPPORTED
00603 #endif
00604
00605
00606 #ifndef PNG_NO_WRITE_EMPTY_PLTE
00607 # define PNG_WRITE_EMPTY_PLTE_SUPPORTED
00608 #endif
00609
00610 #endif
00611
00612 #ifndef PNG_1_0_X
00613 # ifndef PNG_NO_ERROR_NUMBERS
00614 # define PNG_ERROR_NUMBERS_SUPPORTED
00615 # endif
00616 #endif
00617
00618 #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
00619 defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
00620 # ifndef PNG_NO_USER_TRANSFORM_PTR
00621 # define PNG_USER_TRANSFORM_PTR_SUPPORTED
00622 # endif
00623 #endif
00624
00625 #ifndef PNG_NO_STDIO
00626 # define PNG_TIME_RFC1123_SUPPORTED
00627 #endif
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645 #if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)
00646 # define PNG_EASY_ACCESS_SUPPORTED
00647 #endif
00648
00649
00650
00651 #if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
00652 # ifndef PNG_ASSEMBLER_CODE_SUPPORTED
00653 # define PNG_ASSEMBLER_CODE_SUPPORTED
00654 # endif
00655 # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
00656 # define PNG_MMX_CODE_SUPPORTED
00657 # endif
00658 #endif
00659
00660
00661
00662
00663
00664
00665
00666 #if !defined(PNG_1_0_X)
00667 #if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
00668 # define PNG_USER_MEM_SUPPORTED
00669 #endif
00670 #endif
00671
00672
00673 #if !defined(PNG_1_0_X)
00674 #ifndef PNG_SET_USER_LIMITS_SUPPORTED
00675 #if !defined(PNG_NO_SET_USER_LIMITS) && !defined(PNG_SET_USER_LIMITS_SUPPORTED)
00676 # define PNG_SET_USER_LIMITS_SUPPORTED
00677 #endif
00678 #endif
00679 #endif
00680
00681
00682
00683
00684 #ifndef PNG_USER_WIDTH_MAX
00685 # define PNG_USER_WIDTH_MAX 1000000L
00686 #endif
00687 #ifndef PNG_USER_HEIGHT_MAX
00688 # define PNG_USER_HEIGHT_MAX 1000000L
00689 #endif
00690
00691
00692
00693
00694
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727 #if defined(PNG_READ_SUPPORTED) && \
00728 !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
00729 !defined(PNG_NO_READ_ANCILLARY_CHUNKS)
00730 # define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
00731 #endif
00732
00733 #if defined(PNG_WRITE_SUPPORTED) && \
00734 !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
00735 !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS)
00736 # define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
00737 #endif
00738
00739 #ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
00740
00741 #ifdef PNG_NO_READ_TEXT
00742 # define PNG_NO_READ_iTXt
00743 # define PNG_NO_READ_tEXt
00744 # define PNG_NO_READ_zTXt
00745 #endif
00746 #ifndef PNG_NO_READ_bKGD
00747 # define PNG_READ_bKGD_SUPPORTED
00748 # define PNG_bKGD_SUPPORTED
00749 #endif
00750 #ifndef PNG_NO_READ_cHRM
00751 # define PNG_READ_cHRM_SUPPORTED
00752 # define PNG_cHRM_SUPPORTED
00753 #endif
00754 #ifndef PNG_NO_READ_gAMA
00755 # define PNG_READ_gAMA_SUPPORTED
00756 # define PNG_gAMA_SUPPORTED
00757 #endif
00758 #ifndef PNG_NO_READ_hIST
00759 # define PNG_READ_hIST_SUPPORTED
00760 # define PNG_hIST_SUPPORTED
00761 #endif
00762 #ifndef PNG_NO_READ_iCCP
00763 # define PNG_READ_iCCP_SUPPORTED
00764 # define PNG_iCCP_SUPPORTED
00765 #endif
00766 #ifndef PNG_NO_READ_iTXt
00767 # ifndef PNG_READ_iTXt_SUPPORTED
00768 # define PNG_READ_iTXt_SUPPORTED
00769 # endif
00770 # ifndef PNG_iTXt_SUPPORTED
00771 # define PNG_iTXt_SUPPORTED
00772 # endif
00773 #endif
00774 #ifndef PNG_NO_READ_oFFs
00775 # define PNG_READ_oFFs_SUPPORTED
00776 # define PNG_oFFs_SUPPORTED
00777 #endif
00778 #ifndef PNG_NO_READ_pCAL
00779 # define PNG_READ_pCAL_SUPPORTED
00780 # define PNG_pCAL_SUPPORTED
00781 #endif
00782 #ifndef PNG_NO_READ_sCAL
00783 # define PNG_READ_sCAL_SUPPORTED
00784 # define PNG_sCAL_SUPPORTED
00785 #endif
00786 #ifndef PNG_NO_READ_pHYs
00787 # define PNG_READ_pHYs_SUPPORTED
00788 # define PNG_pHYs_SUPPORTED
00789 #endif
00790 #ifndef PNG_NO_READ_sBIT
00791 # define PNG_READ_sBIT_SUPPORTED
00792 # define PNG_sBIT_SUPPORTED
00793 #endif
00794 #ifndef PNG_NO_READ_sPLT
00795 # define PNG_READ_sPLT_SUPPORTED
00796 # define PNG_sPLT_SUPPORTED
00797 #endif
00798 #ifndef PNG_NO_READ_sRGB
00799 # define PNG_READ_sRGB_SUPPORTED
00800 # define PNG_sRGB_SUPPORTED
00801 #endif
00802 #ifndef PNG_NO_READ_tEXt
00803 # define PNG_READ_tEXt_SUPPORTED
00804 # define PNG_tEXt_SUPPORTED
00805 #endif
00806 #ifndef PNG_NO_READ_tIME
00807 # define PNG_READ_tIME_SUPPORTED
00808 # define PNG_tIME_SUPPORTED
00809 #endif
00810 #ifndef PNG_NO_READ_tRNS
00811 # define PNG_READ_tRNS_SUPPORTED
00812 # define PNG_tRNS_SUPPORTED
00813 #endif
00814 #ifndef PNG_NO_READ_zTXt
00815 # define PNG_READ_zTXt_SUPPORTED
00816 # define PNG_zTXt_SUPPORTED
00817 #endif
00818 #ifndef PNG_NO_READ_UNKNOWN_CHUNKS
00819 # define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
00820 # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
00821 # define PNG_UNKNOWN_CHUNKS_SUPPORTED
00822 # endif
00823 # ifndef PNG_NO_HANDLE_AS_UNKNOWN
00824 # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
00825 # endif
00826 #endif
00827 #if !defined(PNG_NO_READ_USER_CHUNKS) && \
00828 defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
00829 # define PNG_READ_USER_CHUNKS_SUPPORTED
00830 # define PNG_USER_CHUNKS_SUPPORTED
00831 # ifdef PNG_NO_READ_UNKNOWN_CHUNKS
00832 # undef PNG_NO_READ_UNKNOWN_CHUNKS
00833 # endif
00834 # ifdef PNG_NO_HANDLE_AS_UNKNOWN
00835 # undef PNG_NO_HANDLE_AS_UNKNOWN
00836 # endif
00837 #endif
00838 #ifndef PNG_NO_READ_OPT_PLTE
00839 # define PNG_READ_OPT_PLTE_SUPPORTED
00840 #endif
00841 #if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
00842 defined(PNG_READ_zTXt_SUPPORTED)
00843 # define PNG_READ_TEXT_SUPPORTED
00844 # define PNG_TEXT_SUPPORTED
00845 #endif
00846
00847 #endif
00848
00849 #ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
00850
00851 #ifdef PNG_NO_WRITE_TEXT
00852 # define PNG_NO_WRITE_iTXt
00853 # define PNG_NO_WRITE_tEXt
00854 # define PNG_NO_WRITE_zTXt
00855 #endif
00856 #ifndef PNG_NO_WRITE_bKGD
00857 # define PNG_WRITE_bKGD_SUPPORTED
00858 # ifndef PNG_bKGD_SUPPORTED
00859 # define PNG_bKGD_SUPPORTED
00860 # endif
00861 #endif
00862 #ifndef PNG_NO_WRITE_cHRM
00863 # define PNG_WRITE_cHRM_SUPPORTED
00864 # ifndef PNG_cHRM_SUPPORTED
00865 # define PNG_cHRM_SUPPORTED
00866 # endif
00867 #endif
00868 #ifndef PNG_NO_WRITE_gAMA
00869 # define PNG_WRITE_gAMA_SUPPORTED
00870 # ifndef PNG_gAMA_SUPPORTED
00871 # define PNG_gAMA_SUPPORTED
00872 # endif
00873 #endif
00874 #ifndef PNG_NO_WRITE_hIST
00875 # define PNG_WRITE_hIST_SUPPORTED
00876 # ifndef PNG_hIST_SUPPORTED
00877 # define PNG_hIST_SUPPORTED
00878 # endif
00879 #endif
00880 #ifndef PNG_NO_WRITE_iCCP
00881 # define PNG_WRITE_iCCP_SUPPORTED
00882 # ifndef PNG_iCCP_SUPPORTED
00883 # define PNG_iCCP_SUPPORTED
00884 # endif
00885 #endif
00886 #ifndef PNG_NO_WRITE_iTXt
00887 # ifndef PNG_WRITE_iTXt_SUPPORTED
00888 # define PNG_WRITE_iTXt_SUPPORTED
00889 # endif
00890 # ifndef PNG_iTXt_SUPPORTED
00891 # define PNG_iTXt_SUPPORTED
00892 # endif
00893 #endif
00894 #ifndef PNG_NO_WRITE_oFFs
00895 # define PNG_WRITE_oFFs_SUPPORTED
00896 # ifndef PNG_oFFs_SUPPORTED
00897 # define PNG_oFFs_SUPPORTED
00898 # endif
00899 #endif
00900 #ifndef PNG_NO_WRITE_pCAL
00901 # define PNG_WRITE_pCAL_SUPPORTED
00902 # ifndef PNG_pCAL_SUPPORTED
00903 # define PNG_pCAL_SUPPORTED
00904 # endif
00905 #endif
00906 #ifndef PNG_NO_WRITE_sCAL
00907 # define PNG_WRITE_sCAL_SUPPORTED
00908 # ifndef PNG_sCAL_SUPPORTED
00909 # define PNG_sCAL_SUPPORTED
00910 # endif
00911 #endif
00912 #ifndef PNG_NO_WRITE_pHYs
00913 # define PNG_WRITE_pHYs_SUPPORTED
00914 # ifndef PNG_pHYs_SUPPORTED
00915 # define PNG_pHYs_SUPPORTED
00916 # endif
00917 #endif
00918 #ifndef PNG_NO_WRITE_sBIT
00919 # define PNG_WRITE_sBIT_SUPPORTED
00920 # ifndef PNG_sBIT_SUPPORTED
00921 # define PNG_sBIT_SUPPORTED
00922 # endif
00923 #endif
00924 #ifndef PNG_NO_WRITE_sPLT
00925 # define PNG_WRITE_sPLT_SUPPORTED
00926 # ifndef PNG_sPLT_SUPPORTED
00927 # define PNG_sPLT_SUPPORTED
00928 # endif
00929 #endif
00930 #ifndef PNG_NO_WRITE_sRGB
00931 # define PNG_WRITE_sRGB_SUPPORTED
00932 # ifndef PNG_sRGB_SUPPORTED
00933 # define PNG_sRGB_SUPPORTED
00934 # endif
00935 #endif
00936 #ifndef PNG_NO_WRITE_tEXt
00937 # define PNG_WRITE_tEXt_SUPPORTED
00938 # ifndef PNG_tEXt_SUPPORTED
00939 # define PNG_tEXt_SUPPORTED
00940 # endif
00941 #endif
00942 #ifndef PNG_NO_WRITE_tIME
00943 # define PNG_WRITE_tIME_SUPPORTED
00944 # ifndef PNG_tIME_SUPPORTED
00945 # define PNG_tIME_SUPPORTED
00946 # endif
00947 #endif
00948 #ifndef PNG_NO_WRITE_tRNS
00949 # define PNG_WRITE_tRNS_SUPPORTED
00950 # ifndef PNG_tRNS_SUPPORTED
00951 # define PNG_tRNS_SUPPORTED
00952 # endif
00953 #endif
00954 #ifndef PNG_NO_WRITE_zTXt
00955 # define PNG_WRITE_zTXt_SUPPORTED
00956 # ifndef PNG_zTXt_SUPPORTED
00957 # define PNG_zTXt_SUPPORTED
00958 # endif
00959 #endif
00960 #ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
00961 # define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
00962 # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
00963 # define PNG_UNKNOWN_CHUNKS_SUPPORTED
00964 # endif
00965 # ifndef PNG_NO_HANDLE_AS_UNKNOWN
00966 # ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
00967 # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
00968 # endif
00969 # endif
00970 #endif
00971 #if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \
00972 defined(PNG_WRITE_zTXt_SUPPORTED)
00973 # define PNG_WRITE_TEXT_SUPPORTED
00974 # ifndef PNG_TEXT_SUPPORTED
00975 # define PNG_TEXT_SUPPORTED
00976 # endif
00977 #endif
00978
00979 #endif
00980
00981
00982
00983
00984
00985 #ifndef PNG_NO_INFO_IMAGE
00986 # define PNG_INFO_IMAGE_SUPPORTED
00987 #endif
00988
00989
00990 #if defined(PNG_tIME_SUPPORTED)
00991 # if !defined(_WIN32_WCE)
00992
00993 # include <time.h>
00994 # endif
00995 #endif
00996
00997
00998
00999
01000
01001
01002
01003
01004
01005
01006 typedef unsigned long png_uint_32;
01007 typedef long png_int_32;
01008 typedef unsigned short png_uint_16;
01009 typedef short png_int_16;
01010 typedef unsigned char png_byte;
01011
01012
01013
01014 #ifdef PNG_SIZE_T
01015 typedef PNG_SIZE_T png_size_t;
01016 # define png_sizeof(x) png_convert_size(sizeof (x))
01017 #else
01018 typedef size_t png_size_t;
01019 # define png_sizeof(x) sizeof (x)
01020 #endif
01021
01022
01023
01024
01025
01026
01027
01028
01029
01030
01031
01032
01033 #ifdef __BORLANDC__
01034 # if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
01035 # define LDATA 1
01036 # else
01037 # define LDATA 0
01038 # endif
01039
01040 # if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
01041 # define PNG_MAX_MALLOC_64K
01042 # if (LDATA != 1)
01043 # ifndef FAR
01044 # define FAR __far
01045 # endif
01046 # define USE_FAR_KEYWORD
01047 # endif
01048
01049
01050
01051
01052
01053 # endif
01054 #endif
01055
01056
01057
01058
01059
01060
01061
01062
01063 #if defined(FAR)
01064 # if defined(M_I86MM)
01065 # define USE_FAR_KEYWORD
01066 # define FARDATA FAR
01067 # include <dos.h>
01068 # endif
01069 #endif
01070
01071
01072 #ifndef FAR
01073 # define FAR
01074 #endif
01075
01076
01077 #ifndef FARDATA
01078 # define FARDATA
01079 #endif
01080
01081
01082
01083 typedef png_int_32 png_fixed_point;
01084
01085
01086 typedef void FAR * png_voidp;
01087 typedef png_byte FAR * png_bytep;
01088 typedef png_uint_32 FAR * png_uint_32p;
01089 typedef png_int_32 FAR * png_int_32p;
01090 typedef png_uint_16 FAR * png_uint_16p;
01091 typedef png_int_16 FAR * png_int_16p;
01092 typedef PNG_CONST char FAR * png_const_charp;
01093 typedef char FAR * png_charp;
01094 typedef png_fixed_point FAR * png_fixed_point_p;
01095
01096 #ifndef PNG_NO_STDIO
01097 #if defined(_WIN32_WCE)
01098 typedef HANDLE png_FILE_p;
01099 #else
01100 typedef FILE * png_FILE_p;
01101 #endif
01102 #endif
01103
01104 #ifdef PNG_FLOATING_POINT_SUPPORTED
01105 typedef double FAR * png_doublep;
01106 #endif
01107
01108
01109 typedef png_byte FAR * FAR * png_bytepp;
01110 typedef png_uint_32 FAR * FAR * png_uint_32pp;
01111 typedef png_int_32 FAR * FAR * png_int_32pp;
01112 typedef png_uint_16 FAR * FAR * png_uint_16pp;
01113 typedef png_int_16 FAR * FAR * png_int_16pp;
01114 typedef PNG_CONST char FAR * FAR * png_const_charpp;
01115 typedef char FAR * FAR * png_charpp;
01116 typedef png_fixed_point FAR * FAR * png_fixed_point_pp;
01117 #ifdef PNG_FLOATING_POINT_SUPPORTED
01118 typedef double FAR * FAR * png_doublepp;
01119 #endif
01120
01121
01122 typedef char FAR * FAR * FAR * png_charppp;
01123
01124
01125
01126
01127
01128 typedef charf * png_zcharp;
01129 typedef charf * FAR * png_zcharpp;
01130 typedef z_stream FAR * png_zstreamp;
01131
01132
01133
01134
01135
01136
01137
01138
01139
01140
01141
01142
01143
01144
01145
01146
01147
01148
01149
01150 #if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))
01151 # define PNG_DLL
01152 #endif
01153
01154
01155
01156
01157 #if defined(__CYGWIN__)
01158 # if !defined(PNG_STATIC)
01159 # if defined(PNG_USE_GLOBAL_ARRAYS)
01160 # undef PNG_USE_GLOBAL_ARRAYS
01161 # endif
01162 # if !defined(PNG_USE_LOCAL_ARRAYS)
01163 # define PNG_USE_LOCAL_ARRAYS
01164 # endif
01165 # else
01166 # if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)
01167 # if defined(PNG_USE_GLOBAL_ARRAYS)
01168 # undef PNG_USE_GLOBAL_ARRAYS
01169 # endif
01170 # endif
01171 # endif
01172 # if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
01173 # define PNG_USE_LOCAL_ARRAYS
01174 # endif
01175 #endif
01176
01177
01178
01179
01180
01181 #if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
01182 # if defined(PNG_NO_GLOBAL_ARRAYS) || (defined(__GNUC__) && defined(PNG_DLL))
01183 # define PNG_USE_LOCAL_ARRAYS
01184 # else
01185 # define PNG_USE_GLOBAL_ARRAYS
01186 # endif
01187 #endif
01188
01189 #if defined(__CYGWIN__)
01190 # undef PNGAPI
01191 # define PNGAPI __cdecl
01192 # undef PNG_IMPEXP
01193 # define PNG_IMPEXP
01194 #endif
01195
01196
01197
01198
01199
01200
01201
01202
01203 #if defined(__MINGW32__) && !defined(PNG_MODULEDEF)
01204 # ifndef PNG_NO_MODULEDEF
01205 # define PNG_NO_MODULEDEF
01206 # endif
01207 #endif
01208
01209 #if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)
01210 # define PNG_IMPEXP
01211 #endif
01212
01213 #if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \
01214 (( defined(_Windows) || defined(_WINDOWS) || \
01215 defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))
01216
01217 # ifndef PNGAPI
01218 # if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
01219 # define PNGAPI __cdecl
01220 # else
01221 # define PNGAPI _cdecl
01222 # endif
01223 # endif
01224
01225 # if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \
01226 0 )
01227 # define PNG_IMPEXP
01228 # endif
01229
01230 # if !defined(PNG_IMPEXP)
01231
01232 # define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol
01233 # define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol
01234
01235
01236 # if defined(_MSC_VER) || defined(__BORLANDC__)
01237 # if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)
01238 # define PNG_EXPORT PNG_EXPORT_TYPE1
01239 # else
01240 # define PNG_EXPORT PNG_EXPORT_TYPE2
01241 # if defined(PNG_BUILD_DLL)
01242 # define PNG_IMPEXP __export
01243 # else
01244 # define PNG_IMPEXP
01245
01246 # endif
01247
01248 # endif
01249 # endif
01250
01251 # if !defined(PNG_IMPEXP)
01252 # if defined(PNG_BUILD_DLL)
01253 # define PNG_IMPEXP __declspec(dllexport)
01254 # else
01255 # define PNG_IMPEXP __declspec(dllimport)
01256 # endif
01257 # endif
01258 # endif
01259 #else
01260 # if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
01261 # ifndef PNGAPI
01262 # define PNGAPI _System
01263 # endif
01264 # else
01265 # if 0
01266 # endif
01267 # endif
01268 #endif
01269
01270 #ifndef PNGAPI
01271 # define PNGAPI
01272 #endif
01273 #ifndef PNG_IMPEXP
01274 # define PNG_IMPEXP
01275 #endif
01276
01277 #ifndef PNG_EXPORT
01278 # define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
01279 #endif
01280
01281 #ifdef PNG_USE_GLOBAL_ARRAYS
01282 # ifndef PNG_EXPORT_VAR
01283 # define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
01284 # endif
01285 #endif
01286
01287
01288
01289
01290
01291 #ifndef PNG_ABORT
01292 # define PNG_ABORT() abort()
01293 #endif
01294
01295 #ifdef PNG_SETJMP_SUPPORTED
01296 # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
01297 #else
01298 # define png_jmpbuf(png_ptr) \
01299 (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)
01300 #endif
01301
01302 #if defined(USE_FAR_KEYWORD)
01303
01304 # define CHECK 1
01305 # define NOCHECK 0
01306 # define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
01307 # define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
01308 # define png_strcpy _fstrcpy
01309 # define png_strncpy _fstrncpy
01310 # define png_strlen _fstrlen
01311 # define png_memcmp _fmemcmp
01312 # define png_memcpy _fmemcpy
01313 # define png_memset _fmemset
01314 #else
01315 # define CVT_PTR(ptr) (ptr)
01316 # define CVT_PTR_NOCHECK(ptr) (ptr)
01317 # define png_strcpy strcpy
01318 # define png_strncpy strncpy
01319 # define png_strlen strlen
01320 # define png_memcmp memcmp
01321 # define png_memcpy memcpy
01322 # define png_memset memset
01323 #endif
01324
01325
01326
01327
01328
01329 #if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)
01330 # undef PNG_ZBUF_SIZE
01331 # define PNG_ZBUF_SIZE 65536L
01332 #endif
01333
01334 #ifdef PNG_READ_SUPPORTED
01335
01336 #if defined(PNG_INTERNAL)
01337
01338
01339
01340
01341
01342
01343
01344 #ifndef PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT
01345 # define PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT 128
01346 #endif
01347 #ifndef PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT
01348 # define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT 9
01349 #endif
01350
01351
01352
01353
01354
01355 #ifdef PNG_USE_PNGVCRD
01356 # define PNG_HAVE_ASSEMBLER_COMBINE_ROW
01357 # define PNG_HAVE_ASSEMBLER_READ_INTERLACE
01358 # define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
01359 #endif
01360
01361
01362
01363
01364
01365 #ifdef PNG_USE_PNGGCCRD
01366 # define PNG_HAVE_ASSEMBLER_COMBINE_ROW
01367 # define PNG_HAVE_ASSEMBLER_READ_INTERLACE
01368 # define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
01369 #endif
01370
01371
01372 #endif
01373 #endif
01374
01375 #endif
01376